import * as types from '../action-types';
import axios from 'axios';
export default {
	getHomeList() {
		// https://github.com/reduxjs/redux-thunk/blob/master/src/index.js
		return function (dispatch,getState,request) {
			return request.get('http://localhost:4000/api/users').then(result => {
				let list=result.data;
				dispatch({
					type: types.SET_HOME_LIST,
					payload:list
				});
			});
		}
	}
}